﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test2_24Jan
{
    class Human
    {
        private string firstName;
        private string lastName;
        private DateTime dayOfBith;
        private DateTime Today = DateTime.Now;

        public Human(string firstName, string lastName, DateTime dayOfBith)
        {
            FirstName = firstName;
            LastName = lastName;
            DayOfBith = dayOfBith;
        }

        public string FirstName
        {
            private set
            {
                if (value != null)
                {
                    firstName = value;
                }
            }
            get
            {
                return firstName;
            }
        }
        public string LastName
        {
            private set
            {
                if (value != null)
                {
                    lastName = value;
                }
            }
            get
            {
                return lastName;
            }
        }
        public DateTime DayOfBith
        {
            private set
            {
                if (value < Today)
                {
                    dayOfBith = value;
                }
            }
            get
            {
                return dayOfBith;
            }
        }
    }
}
